package com.opal.system.controller;

import com.opal.system.service.EasyuiDatagridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("easyui")
public class EasyuiController {

    @Autowired
    private EasyuiDatagridService easyuiDatagridService;

    /**
     * 根据类型获取easyui_datagrid的属性columns的值:用于单纯刷新一个表格数据，没有事件、可编辑类型
     * @param typeName
     * @return
     */
    @RequestMapping("datagrid/getEasyuiDatagridColumn")
    @ResponseBody
    public Object getEasyuiDatagridColumn(String typeName){
        return easyuiDatagridService.getEasyuiDatagridColumnService(typeName);
    }
}
